package com.yurun.orglessonmodule.mapper;

import com.yurun.commonapi.pojo.Classroom;
import com.yurun.commonapi.pojo.Lesson;
import com.yurun.commonapi.pojo.LessonSet;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;

@Mapper
@Repository
public interface LessonMapper {

    List<Lesson> allLessonInfo(@Param("organizationId") BigInteger organizationId, @Param("branchId") BigInteger branchId, @Param("lessonName") String lessonName);

    int addLesson(Lesson lesson);

    Lesson getOneLessonInfo(BigInteger timetableId);

    int editLesson(Lesson lesson);

    int delLesson(BigInteger timetableId);

    BigInteger lessonIdIsRepeat(BigInteger lessonId);

    List<Classroom> getClassroomOption(Classroom classroom);

    List<LessonSet> getSchoolYearOption(Classroom classroom);

    List<LessonSet> getTermOption(LessonSet lessonSet);

    int addLessonSet(LessonSet lessonSet);

    LessonSet getOneTimetable(LessonSet lessonSet);

    List<Lesson> getLessonOption(@Param("organizationId") BigInteger organizationId, @Param("branchId") BigInteger branchId);

    List<String> getTeacherOptionByLessonName(Lesson lesson);

    int editLessonSet(LessonSet lessonSet);

}
